{% extends "base.html" %}
{% block head %}
    <head>
        <meta charset="UTF-8">
        <title>测试管理系统</title>
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
        <link rel="stylesheet" href="../static/layui/css/layui.css">
        <script src="../static/layui/layui.js"></script>
        <!--     <script type="text/javascript">try { Typekit.load(); } catch (e) { }</script> -->
        <script type="text/javascript" src="../static/js/tool_p.js"></script>
    </head>
{% endblock head %}
{% block left %}
	{{ super() }}
{% endblock left %}
{% block right %}
	{{ super() }}
	<!-- 修改name（页面名称） -->
	{% set name = '自动化测试报告' %}
	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		<legend>{{name}}</legend>
	</fieldset>
	<!-- 页面私有部分 -->


<div class="layui-tab">
    <ul class="layui-tab-title">
        <li class="layui-btn layui-btn-normal">APP自动化最新报告</li>
        <li class="layui-btn layui-btn-warm" data-id=1 onclick="appreportlist()">更多报告</li>
<!--         <span class="layui-btn layui-btn-warm" data-id=1 onclick="appreportlist(this)">更多报告</span> -->
        <li class="layui-btn layui-btn-normal">Web自动化最新报告</li>
        <li class="layui-btn layui-btn-warm">更多报告</li>
    </ul>

<!-- app自动化的报告部分 -->
    <div class="layui-tab-content" style="height: 1000px;">
		{% set appnewreport = appnewreport %}
        <div class="layui-tab-item layui-show">
			<iframe name="myiframe" id="myrame" src={{appnewreport}} style="zoom:100%;margin-right:10px"  frameborder="0" scrolling="" width=100% height="1000px"></iframe>
        </div>

        <div class="layui-tab-item">
            {% for i,j in appreportlist.items() %}
				<ul class="layui-timeline" style="margin-left:40px;margin-top:20px">
				  <li class="layui-timeline-item">
				    <i class="layui-icon layui-timeline-axis"></i>
				    <div class="layui-timeline-content layui-text">
						<div class="layui-timeline-title"><a target = "_blank" href={{j}}>{{i}}</a></div>
				    </div>
				  </li>
				</ul>
			{% endfor %}
        </div>

<!-- web自动化的报告部分 -->
		<div class="layui-tab-item"> 
			<div class="layui-tab-item layui-show">
	            {% for m in webnewreport %}
	                <iframe name="myiframe" id="myrame" src={{m}} style="zoom:100%;margin-right:10px"  frameborder="0" scrolling="" width=100% height="600px"></iframe>
	            {% endfor %}
            </div>		    
		</div>

        <div class="layui-tab-item">
            {% for i,j in webreportlist.items() %}
				<ul class="layui-timeline" style="margin-left:40px;margin-top:20px">
				  <li class="layui-timeline-item">
				    <i class="layui-icon layui-timeline-axis"></i>
				    <div class="layui-timeline-content layui-text">
						<div class="layui-timeline-title">{{i}}</div>	    
					      <ul>
					        <li><a href="{{j}}/bbs.html" target="_blank">论坛</a></li>
					        <li><a href="{{j}}/product.html" target="_blank">产品库</a></li>
					        <li><a href="{{j}}/information.html" target="_blank">资讯</a></li>
					      </ul>		
				    </div>
				  </li>
				</ul>
			{% endfor %}
        </div>

	</div>
</div>



<script>


function appreportlist(e) {
    var reportid = e.dataset.id;
    var xmlhttp;
    xmlhttp = new XMLHttpRequest();
    var data = '{ "reportid" : ' + reportid + '}';
    xmlhttp.open("POST", "appreport2", true);
    xmlhttp.send(data);
    xmlhttp.onreadystatechange = function () {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            if (xmlhttp.responseText == 'ok') {
                location.reload()
            } 
        }
    }
}



</script>





{% endblock right %}
<!-- 此模板现有部分，除页面名称外，其他均不可编辑 -->